/**************************************************************************************
 *
 * @(#) ApiResultCodeEnums.java
 * @Package com.jgdt.jgdtkasannong_university_gene_backend.config.enums.video.ys
 **************************************************************************************/
package com.jgdt.jgdtkasannong_university_gene_backend.config.enums.video.ys;

import com.jgdt.jgdtkasannong_university_gene_backend.config.enums.FilePatternsEnums;
/**
 * @description: 萤石云 api 接口返回编码
 * @author: huangAn
 * @createDate: 2025/04/29
 */
public enum ApiResultCodeEnums {

    /**
     * 操作成功
     */
    SUCCESS("200", "操作成功	","请求成功"),
    /**
     * 参数错误
     */
    PARAMETER_ERROR("10001", "参数错误","参数为空或格式不正确"),
    /**
     * ACCESSTOKEN异常或过期
     */
    ACCESSTOKEN_ERR("10002", "ACCESSTOKEN异常或过期","重新获取ACCESSTOKEN"),
    /**
     * APPKEY异常
     */
    APPKEY_ERR("10005", "APPKEY异常","APPKEY被冻结"),


    ;

    private String code;
    private String msg;
    private String marker;

    private String field;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    public String getMarker() {
        return marker;
    }
    ApiResultCodeEnums(String code, String msg,String marker) {
        this.code = code;
        this.msg = msg;
        this.marker = marker;
    }

    public static FilePatternsEnums getEnumsByCode(String code){
        for(FilePatternsEnums enums: FilePatternsEnums.values()){
            if(enums.getCode().equals(code)){
                return enums;
            }
        }
        return null;
    }
}




